package world;

import javax.media.j3d.*;

import world.geometry.Clock;

import java.util.*;

public class ClockBehavior extends Behavior {

    private Clock clock_;
    WakeupOnElapsedTime conditions_ = new WakeupOnElapsedTime(6000);
    
    public ClockBehavior (Clock clock) {
    	clock_ = clock;
    }

    public void initialize() {
    	wakeupOn (conditions_);
    }

    public void processStimulus (Enumeration criteria) {
    	clock_.setTimeNow ();
    	wakeupOn (conditions_);
    }
}
